let axios = require('axios');
module.exports ={
    namespaced:true,
    state: {
        
    },
    mutations: {
        
    },
    actions: {
        async getMerchantAsync(context,merchant){
            let data = await axios.post('/shop/getMerchant',{merchantName: merchant});
            return data.data[0];
        },
        async createShopAsync(context,shop){
            let data = await axios.post('/shop/addShop',shop);
            return data.data;
        },
        async updateShopAsync(context,shop){
            return await axios.post('/shop/updateShop',shop);
        },
        async deleteShopAsync(context,shop){
            return await axios.post('/shop/deleteShop',shop);
        }
    },
    modules: {
    }
}